#include <stdio.h>

int n;
int a;
int even;
int odd;
int onum, evnum;

int main() {
	scanf("%d", &n);

	even=0;; odd=0;

	for (int i=0; i<n; i++) {
		scanf("%d", &a);

		if (a%2==0) { 
			even++;
			evnum = i+1;
		}
		else {
			odd++;
			onum = i+1;
		}
	}

	if (odd==1) printf("%d\n", onum);
	else printf("%d\n", evnum);
}
